<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>三元运算符</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script type="text/javascript">
    
            var  n1=123;
        	var  n2=456;

        	// if(n1>n2){
        	// 	 alert(n1);
        	// }else{
        	// 	 alert(n2);
        	// }



           n1>n2?alert(n1):alert(n2);

    </script>
</head>
<body>
    
</body>
</html>